[gd_scene load_steps=7 format=3 uid="uid://03qtaden8ue7"]

[ext_resource type="Script" path="res://scenes/chest/chest.gd" id="1_ikcn7"]
[ext_resource type="Texture2D" uid="uid://ci7io317nw2sx" path="res://assets/sprites/chest/chest.png" id="2_4eqci"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_7vugd"]
size = Vector2(64, 32)

[sub_resource type="Animation" id="Animation_aur2p"]
resource_name = "Open"
length = 0.6
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2, 0.4),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 1, 2]
}

[sub_resource type="Animation" id="Animation_4etyl"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_ppdy6"]
_data = {
"Open": SubResource("Animation_aur2p"),
"RESET": SubResource("Animation_4etyl")
}

[node name="Chest" type="Area2D"]
collision_layer = 16
collision_mask = 2
script = ExtResource("1_ikcn7")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_4eqci")
offset = Vector2(4, 4)
hframes = 3

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_7vugd")

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ppdy6")
}

[connection signal="body_entered" from="." to="." method="show_interaction_prompt"]
[connection signal="body_exited" from="." to="." method="hide_interaction_prompt"]
